<{include file="section/admin/admin_header.tpl"}>
<body>
<{include file="section/admin/admin_header_login_bar.tpl"}>
<div id="contentA" class="clear" style="width:1300px;">
	<!--leftsidebar sr-->
	<{include file="section/admin/admin_left_sidebar.tpl"}>
    <!--/leftsidebar end-->
    <div class="rightCont">
    	<!--path st-->
		<div class="path">您的位置：<a href="/">首页</a>&gt; <a href="/user/admin_list" target="_blank">管理员管理</a> &gt; 修改管理员</div>
		<!--/path end-->
		
		<{$message}>

    	<h2 class="title01"><span>修改管理员</span></h2>
        <div class="line1"></div>
		<div class="boxform">
			<form action="/user/add_admin" method="post" name="frm" id="frm">
			<input type="hidden" name="action" value="modify" />
			<input type="hidden" name="uid" value="<{$data.uid}>" />
            <ul class="clear">
            <li class="i1"><span class="red">*</span> 账　　号：</li>
            <li><span class="in"><input type="text" name="passport" disabled="true" class="in2" onblur="this.className='in2'" onfocus="this.className='in1'" value="<{$data.passport}>" style="width:177px;" /></span></li>
            </ul>
            <ul class="clear">
            <li class="i1"><span class="red">*</span> 姓　　名：</li>
            <li><span class="in"><input type="text" name="realname"  disabled="true" class="in2" onblur="this.className='in2'" onfocus="this.className='in1'" value="<{$data.realname}>" style="width:177px;" /></span></li>
            </ul>
			<ul class="clear">
            <li class="i1"><span class="red">*</span> 角　　色：</li>
            <li><span class="in">           
			<select class="in2" name="role_name" onblur="this.className='in2'" onfocus="this.className='in1'" style="width:177px;" >
				<option value="2" <{if $role.flag}>selected<{/if}> >装修网运营管理员</option>
				<option value="3" <{if $role.flag}>selected<{/if}> >商家管理员</option>
				<option value="21" <{if $role.flag}>selected<{/if}> >审核管理员</option>
				<option value="23" <{if $role.flag}>selected<{/if}> >运营管理员</option>
				<option value="24" <{if $role.flag}>selected<{/if}> >超级管理员</option>	
			</select>
			</span></li> 
			</ul>
            <ul class="clear">
            <li class="i1">手　　机：</li>
            <li><input type="text" class="in2" name="mobile" onblur="this.className='in2'" onfocus="this.className='in1'" value="<{$data.mobile}>" style="width:177px;" /></li>
            </ul>

			<div class="line margin25"></div>
            <ul class="clear">
            <li class="i1">&nbsp;</li>
            <li>
            	<input type="submit" class="btn04" value="确　定"/>　<input type="reset" class="btn04" value="取　消" />
            </li>
            </ul>
			</form>
        </div>
        
    </div>
</div>
</body>
<script type="text/javascript">
var frm = document.getElementById('frm');
frm.onsubmit = function ()
{
	with(this)
	{
		if(login_name.value == '')
		{
			ymPrompt.errorInfo('请填写帐号',null,null,'错误提示',function(){ymPrompt.close();login_name.focus();});
			return false;
		}
		if(realname.value == '')
		{
			ymPrompt.errorInfo('请填写姓名',null,null,'错误提示',function(){ymPrompt.close();realname.focus();});
			return false;
		}
		action.value = 'add';
	}
	return true;
}
function errMsg(msg)
{
	if(ymPrompt)
		ymPrompt.errorInfo(msg,null,null,'错误提示',function(){ymPrompt.close();frm.login_name.focus();});
}
function admin_tuan(obj)
{
	if(obj.checked)
	{
		$('#admin_group').show();
	}
	else
	{
		$('#city_selected').html('');
		$('.city_chk:checked').each(function(){
			this.checked = false;
		});
		$('#admin_group').hide();
	}
}
if($('.city_chk'))
{
$('.city_chk').hover(
	function (){
		$(this).css('cursor','pointer');
		var id = 'span_' + $(this).attr('name').substr(4);
		if($('#'+id))
		{
			$('#'+id).css('background-color','#00A100');
			$('#'+id).css('color','#FFFFFF');
		}
	},
	function (){
		$(this).css('cursor','auto');
		var id = 'span_' + $(this).attr('name').substr(4);
		if($('#'+id))
		{
			$('#'+id).css('background-color','#FFFFFF');
			$('#'+id).css('color','#333333');
		}
	}
);
$('.city_chk').click(function(){
	var id = 'span_' + $(this).attr('name').substr(4);
	var arr = id.split('_');
	var city_id = 'city_'+arr[1];
	var channel_id = 'channel_'+arr[2];
	var text = $('#'+city_id).text() + $('#'+channel_id).text();
	if($(this).attr('checked'))
	{
		$('#city_selected').append($('<span id="'+id+'">'+text+'</span>'));
	}else{
		$('#'+id).remove();
	}
});
}
</script>
</html>
